<?php
/* * **************************************************************************************\
 * *   @name		EXP Templates 1.0                                               **
 * *   @package          Joomla 1.6/1.7/2.5                                              **
 * *   @author		EXP TEAM::Alexey Kurguz (Grusha)                                **
 * *   @copyright	Copyright (C) 2005 - 2012  EXP TEAM::Alexey Kurguz (Grusha)     **
 * *   @link             http://www.feellove.eu                                          **
 * *   @license		Commercial License                                              **
  \*************************************************************************************** */
// No direct access.
defined('_JEXEC') or die;
$app = JFactory::getApplication();
$params = $app->getTemplate(true)->params;
$logo = $params->get('logo');
$footerlogo = $params->get('footerlogo');
$logolink = $params->get('logolink');
$sitetitle = $params->get('sitetitle');

if ($params->get('bootstrap')) {
    $bootstrap = $params->get('bootstrap');
} else {
    $bootstrap = 'bootstrap.css';
}
if ($params->get('expbootstrap')) {
    $expbootstrap = $params->get('expbootstrap');
} else {
    $expbootstrap = 'expbootstrap.css';
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>">
    <head>
        <jdoc:include type="head" />
        <link href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template; ?>/css/bootstrap/<?php echo $bootstrap; ?>" rel="stylesheet" type="text/css" />
        <link href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template; ?>/css/bootstrap-responsive.css" rel="stylesheet" />
        <style type="text/css">
            body {
                padding-top: 40px;
                padding-bottom: 0px;
            }
            .alert-error {
                padding: 0;
                border: none;
            }
            
            #system-message-container dl{
                padding: 10px;
            }
        </style>
    </head>
    <body>
        <div class="navbar navbar-fixed-top navbar-inverse">
            <div class="navbar-inner">
                <div class="container">
                    <a class="brand" href="<?php echo $this->baseurl ?>">
                        <?php if ($logo): ?>
                            <img src="<?php echo $this->baseurl ?>/<?php echo htmlspecialchars($logo); ?>"  alt="<?php echo htmlspecialchars($sitetitle); ?>" />
                        <?php else: ?>
                            <?php echo htmlspecialchars($sitetitle); ?>
                        <?php endif; ?>
                    </a>
                </div>
            </div>
        </div>
        <div id="exptemplates" class="container">
            <div class="row">
                <div class="span4 offset4">
                    <div class="alert alert-error">
                        <jdoc:include type="message" />
                    </div>
                    <?php if ($app->getCfg('offline_image')) : ?>
                        <a class="thumbnail" href="<?php echo $this->baseurl ?>">
                            <img src="<?php echo $app->getCfg('offline_image'); ?>" alt="<?php echo htmlspecialchars($app->getCfg('sitename')); ?>" />
                        </a>
                        <br />
                    <?php endif; ?>
                    <div class="alert alert-info" style="text-align:center;">
                        <h2><?php echo htmlspecialchars($app->getCfg('sitename')); ?></h2>
                    </div>
                    <form class="well" action="<?php echo JRoute::_('index.php', true); ?>" method="post" id="form-login">
                        <label><?php echo JText::_('JGLOBAL_USERNAME') ?></label>
                        <input name="username" id="username" type="text" class="span3" alt="<?php echo JText::_('JGLOBAL_USERNAME') ?>"  placeholder="<?php echo JText::_('JGLOBAL_USERNAME') ?>" />
                        <label><?php echo JText::_('JGLOBAL_PASSWORD') ?></label>
                        <input name="password" id="passwd" type="password" class="span3" alt="<?php echo JText::_('JGLOBAL_USERNAME') ?>"  placeholder="<?php echo JText::_('JGLOBAL_PASSWORD') ?>" />
                        <label class="checkbox">
                            <input type="checkbox" name="remember" class="inputbox" value="yes" alt="<?php echo JText::_('JGLOBAL_REMEMBER_ME') ?>" id="remember" /><?php echo JText::_('JGLOBAL_REMEMBER_ME') ?>
                        </label>  
                        <input type="submit" name="Submit" class="btn btn-primary button" value="<?php echo JText::_('JLOGIN') ?>" />
                        <input type="hidden" name="option" value="com_users" />
                        <input type="hidden" name="task" value="user.login" />
                        <input type="hidden" name="return" value="<?php echo base64_encode(JURI::base()) ?>" />
                        <?php echo JHtml::_('form.token'); ?>
                    </form>
                    <div class="alert alert-block">
                        <?php if ($app->getCfg('display_offline_message', 1) == 1 && str_replace(' ', '', $app->getCfg('offline_message')) != ''): ?>
                            <p>
                                <?php echo $app->getCfg('offline_message'); ?>
                            </p>
                        <?php elseif ($app->getCfg('display_offline_message', 1) == 2 && str_replace(' ', '', JText::_('JOFFLINE_MESSAGE')) != ''): ?>
                            <p>
                                <?php echo JText::_('JOFFLINE_MESSAGE'); ?>
                            </p>
                        <?php endif; ?>
                    </div>
                </div>
            </div>
            <footer class="exptemplates_footer">
                <div class="navbar navbar-inverse">
                    <div class="navbar-inner">
                        <div class="container">
                            <a class="brand" href="<?php echo $logolink ?>">
                                <?php if ($footerlogo): ?>
                                    <img src="<?php echo $this->baseurl ?>/<?php echo htmlspecialchars($footerlogo); ?>"  alt="<?php echo htmlspecialchars($sitetitle); ?>" />
                                <?php else: ?>
                                    <img src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template; ?>/images/logo_exp.png"  alt="<?php echo htmlspecialchars($sitetitle); ?>" />
                                <?php endif; ?>
                            </a>
                            <div class="nav pull-right">
                                <a class="brand" href="<?php echo $this->baseurl ?>">
                                    <p>
                                        <?php echo htmlspecialchars($sitetitle); ?> &copy; Company 2012
                                    </p>
                                </a>
                            </div>
                        </div>
                    </div>
                </div>
            </footer>
        </div>
    </body>
</html>
